﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Stee.Cap8.MessageBus.EventBus.Interfaces
{
    public interface IEventBus
    {
        bool Subscribe<Tevent, TEventHandler>() where TEventHandler : IEventHandler<Tevent> where Tevent : IEventBase;

        bool Unsubscribe<Tevent, TEventHandler>() where TEventHandler : IEventHandler<Tevent> where Tevent : IEventBase;

        bool Publish<TEvent>(TEvent @event) where TEvent : IEventBase;

    }
}
